package cn.fan.job;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class RemindJob {
    @Autowired
    private RabbitTemplate rabbitTemplate;

    @Scheduled(cron = "${autotask.cron.remind}")
    private void gatherStore(){
        String exchange="remind.direct";
        String key = "remind";
        String message="remind";
        rabbitTemplate.convertAndSend(exchange,key,message);
    }
}
